//  this library.
import 'package:hktk_app/model/data_model.dart';
import 'package:hktk_app/model/question/paper_data_model.dart';
import 'package:hktk_app/util/chapter_refresh_state_util.dart';

/// 全局单列，储存数据，方便调用
class DataUtil {
  static final DataUtil _dataUtil = DataUtil._init();

  DataModel dataModel;

  PaperDataModel? paperData;

  /// 进入每日一练记录时，缓存前面每日一练的相关数据
  PaperDataModel? recordData;

  /// 刷新状态
  ChapterRefreshStateUtil chapterRefreshState;

  factory DataUtil() => _dataUtil;

  DataUtil._init()
      : dataModel = DataModel(
    industryId: '0',
    examId: '0',
    categoryId: 0,
    industryName: '',
    examName: '',
    categoryName: '',
    myList: [],
    visitorsType: false,
  ),
        chapterRefreshState = ChapterRefreshStateUtil();
}

final dataUtilComm = DataUtil();
